package com.truthbean.jeetb.model.sys.entity;

import javax.enterprise.context.RequestScoped;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * Created by TruthBean on 2016-10-09 14:54.
 */
@RequestScoped
@Entity
@Table(name = "jeetb_news_type")
//@NamedQueries({
//    @NamedQuery(name = "NewsType.findOpenType", query = "SELECT e FROM NewsType e where password is null")
//})
public class NewsType implements Serializable {
    @Id
    @GeneratedValue
    private int id;

    @NotNull
    private String name;

    @NotNull
    private String path;

    private String password;

    @ManyToOne(targetEntity = NewsType.class)
    private NewsType parent;
}
